#ifndef _SCRIPT_TARGETING_HDR
#define _SCRIPT_TARGETING_HDR

// --------------------------------------------------------------------------
// Context resolution helper functions
// --------------------------------------------------------------------------

class t_creature_array;
class t_adventure_map;
class t_town;
class t_hero;
class t_army;
class t_player;
class t_owned_adv_object;

#include "script_target_type.h"
#include "scriptable_event.h"
#include "script_context_args.h"

void						execute_hero_script(t_hero_scriptable_event event, t_script_context_hero const& context, t_creature_array const * losses );
void						post_execute_validate(t_creature_array* array);
t_hero*						select_hero_by_target(t_script_hero_target target, t_creature_array* garrison, t_hero* hero, t_creature_array* army, t_creature_array* opposing_army);
t_hero const*				select_hero_by_target(t_script_hero_target target, t_creature_array const* garrison, t_hero const* hero, t_creature_array const* army, t_creature_array const* opposing_army);
t_player*					select_player_by_target(t_script_player_target target, t_adventure_map* map, t_owned_adv_object* adv_object, t_player* owner, t_player* opposing_army_owner);
t_player const*				select_player_by_target(t_script_player_target target, t_adventure_map const* map, t_owned_adv_object const* adv_object, t_player const* owner, t_player const* opposing_army_owner);
t_creature_array* 			select_creature_array_by_target(t_script_stack_target target, t_creature_array* garrison, t_creature_array* army, t_creature_array* opposing_army);
t_creature_array const* 	select_creature_array_by_target(t_script_stack_target target, t_creature_array const* garrison, t_creature_array const* army, t_creature_array const* opposing_army);
t_creature_array*			select_army_by_target(t_script_army_target target, t_creature_array* garrison, t_creature_array* army, t_creature_array* opposing_army);
t_creature_array const*		select_army_by_target(t_script_army_target target, t_creature_array const* garrison, t_creature_array const* army, t_creature_array const* opposing_army);


#endif